package com.woniu.command.inventoryCommand;

import com.woniu.command.CommandString;
import com.woniu.command.handler.InventoryCommandHandler;
import com.woniu.outlet.po.InventoryPo;
import com.woniu.util.ApplicationContextHolder;

public class PurchaseDetailCommand implements CommandString<InventoryPo> {
    private InventoryCommandHandler handler;

    public PurchaseDetailCommand(){
        this.handler = ApplicationContextHolder.getApplicationContext()
                .getBean(InventoryCommandHandler.class);
    }

    @Override
    public String execute(InventoryPo inventoryPo) {
        return handler.finishPurchase(inventoryPo);
    }
}
